<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableUserGames extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_games', function (Blueprint $table) {
            $table->increments('user_game_id')->comment('用户游戏表id');
            $table->integer('uid')->default(0)->comment('关联用户id');
            $table->integer('user_ddzwin')->default(0)->comment('用户斗地主获胜次数');
            $table->integer('user_ddzlose')->default(0)->comment('用户斗地主输掉次数');
            $table->integer('user_esywin')->default(0)->comment('用户二十一点获胜次数');
            $table->integer('user_esylose')->default(0)->comment('用户二十一点输掉次数');
            $table->integer('user_xqwin')->default(0)->comment('用户象棋获胜次数');
            $table->integer('user_xqlose')->default(0)->comment('用户象棋失败次数');
            $table->integer('user_wzqwin')->default(0)->comment('用户五子棋的胜场');
            $table->integer('user_wzqlose')->default(0)->comment('用户五子棋的负场');
            $table->integer('user_djscount')->default(0)->comment('用户打僵尸的总场数');
            $table->integer('user_djshigh')->default(0)->comment('用户打僵尸的最高分');
            $table->integer('user_cbkcount')->default(0)->comment('用户踩白块的总场数');
            $table->integer('user_cbkhigh')->default(0)->comment('用户踩白块的最高分');
            $table->integer('user_meiqiu')->default(0)->comment('用户的煤球');
            $table->tinyInteger('user_level')->default(1)->comment('用户的级别');
            $table->integer('user_exp')->default(0)->comment('用户的经验');
            $table->char('user_pic')->default('')->comment('用户头像');
            $table->char('user_intro',100)->default('')->comment('用户描述');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('user_games');
    }
}
